package com.lexicalAnalyzer;

/**
 * Created with IntelliJ IDEA.
 * User: Lenovo
 * Date: 23.11.2012
 * Time: 11:35
 * To change this template use File | Settings | File Templates.
 */
public interface ISymbolTable
{
    /**
     * Inserts a lexeme into the symbol table.
     * @param lexeme The lexeme
     * @return A {@link SymbolTableEntry} object
     */
    public abstract SymbolTableEntry Insert(String lexeme);

    /**
     * Looks up an entry given its lexeme.
     * @param lexeme The lexeme.
     * @return A {@link SymbolTableEntry} object if the lexeme is found, otherwise {@code null}
     */
    public abstract SymbolTableEntry LookUp(String lexeme);

    /* (non-Javadoc)
      * @see java.lang.Object#toString()
      */
    public abstract String toString(); // Override so that the symbol table can be "printed" out
}
